Skip to content

London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 #646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

SuWebOnes
Copy link

@SuWebOnes SuWebOnes commented Jul 7, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
    [x] I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
    [x] I have tested my changes
    [x] My changes follow the style guide
    [x] My changes meet the requirements of this task

Changelist

Briefly explain my PR.

Function Parameter and Return Handling
String Manipulation and Formatting
Time Conversion Logic
Testing and Debugging

Questions

Ask any questions you have for your reviewer.

SuWebOnes added 14 commits June 24, 2025 19:07
…m number generation in sprint -1 of 4-random.js
…reassignment in percentage change calculation
and describe the purpose  in sprint -1 of 3-to-pounds.js
@SuWebOnes SuWebOnes added the Needs Review Participant to add when requesting review label Jul 7, 2025
@SuWebOnes SuWebOnes changed the title Coursework/sprint 1 London | May-2025 | Surafel Workneh | Coursework/sprint 1 Jul 7, 2025
@SuWebOnes SuWebOnes changed the title London | May-2025 | Surafel Workneh | Coursework/sprint 1 London | ITP-May-2025 | Surafel Workneh | Coursework/sprint 1 Jul 7, 2025
@SuWebOnes SuWebOnes changed the title London | ITP-May-2025 | Surafel Workneh | Coursework/sprint 1 London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 Jul 12, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 17, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkboxes in the PR descriptions are not in proper markdown syntax. Can you fix their markdown syntax? (I fixed one of them for you so that you can follow the example).

Comment on lines +20 to +24
filePath
.slice(lastSlashIndex + 1)
.split(".")
.pop();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these code for? They are not doing anything.

.padStart(2, "0")}`;
}
console.log(convertTo12HourClockTime(twentyFourHourClockTime)); // Output: "08:53 PM"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation! I don't think this statement outputs exactly "08:53 PM".

// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?
// There are no errors in the code. The code runs successfully and calculates the percentage change in car price without any issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably have fixed the error before answering question (b)

// 1. const penceString = "399p": initialize a string variable with the value "399p"
//2. Removes the trailing "p" from the string: and result will be 399
//3. Ensures the number has at least 3 digits by padding from the left with zeros: like 000
//4. Extracts the pound portion: "3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") (line 16) from the code?
In other words, do we really need .padEnd(2, "0") in this script?

What is the return value of `prompt`?
surafel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the question is asking, in general, what does prompt() return when a user clicks "OK" and when a user clicks "Cancel".

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants